﻿//-----------------------------------------------------------------------
// <copyright file="ProprietorStatusFactory.cs" company="Mulala">
//     Copyright Mulala. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Mulala.Cavan.Domain.MainBoundedContext.ProprietorModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Mulala.Cavan.Domain.MainBoundedContext.Setting;

    public static class ProprietorStatusFactory
    {
        public static ProprietorStatus CreateProprietorStatus(
                                            DateTime basicInfoCheckedTime,
                                            DateTime avatarCheckedTime,
                                            ProprietorIdentifier.CheckedStatus basicInfoStatus,
                                            ProprietorIdentifier.CheckedStatus avatarStatus,
                                            ProprietorIdentifier.CheckedStatus checkedStatus,
                                            DateTime editTime,
                                            string editUser)
        {
            ProprietorStatus proprietorStatus = new ProprietorStatus();
            proprietorStatus.AvatarCheckedTime = avatarCheckedTime;
            proprietorStatus.AvatarStatus = avatarStatus;
            proprietorStatus.BasicInfoCheckedTime = basicInfoCheckedTime;
            proprietorStatus.BasicInfoStatus = basicInfoStatus;
            proprietorStatus.CheckedStatus = checkedStatus;
            proprietorStatus.EditTime = editTime;
            proprietorStatus.EditUser = editUser;
            proprietorStatus.CreateTime = DateTime.Now;

            return proprietorStatus;
        }

        public static ProprietorStatus CreateProprietorStatus(string editUser)
        {
            ProprietorStatus proprietorStatus = ProprietorStatusFactory.CreateProprietorStatus(DateTime.Parse(Project.Settings.DefaultTime), DateTime.Parse(Project.Settings.DefaultTime), ProprietorIdentifier.CheckedStatus.UnChecked,
                                                                        ProprietorIdentifier.CheckedStatus.UnChecked, ProprietorIdentifier.CheckedStatus.UnChecked, DateTime.Now, editUser);

            return proprietorStatus;
        }
    }
}
